/**
 * 系统用户查看js
 */
var sysUserLook={
	dataCache:null,
		
	startEvent:function(){
		sysUserLook.showInfoById();
	},
	
	showInfoById:function(){
		var lokId=art.dialog.data('lokId');  //修改id
        var ret = eval('(' + localStorage.getItem(lokId+"_User_Key") + ')');
        for(var i in ret){
            var text=ret[i];
            if(i=='entryTime'||i=='leaveTime'||i=='birthday'){
                text=text==null?'':(new Date(text)).format('yyyy-MM-dd');
            }else if( i=='level'){
                text=jsUtils.getDictionaryTxtByType(i, text);
            }else if("isInside"==i || "closeAccount" ==i){
                text=text==1?"是":"否";
            }else if ("orgName" == i){
                if(ret.isInside == 0){
                    text ='';
                }
            }else if("onType" ==i){
                text =  ret.isInside==1?(ret.onType== 1 ? "离职":"在职"):"客户"
            }

            $('#com-addForm td[name="'+i+'"]').html(text);
        }
	},
	
	init:function(){
		sysUserLook.startEvent();
	}
}
$(document).ready(function() {
	sysUserLook.init();
});